package app.GUI;

import javax.swing.JOptionPane;

import app.Logic.UserAccounts;

public class LogOut {
	private UserAccounts accounts;
	private HomeScreen outsideFrame;
	
	public LogOut(UserAccounts list, HomeScreen outside){
		accounts = list;
		outsideFrame = outside;
	}
	
	public void logoutPanel(){
		JOptionPane.showMessageDialog(outsideFrame.getFrame(), 
				"You successfully logged out!",
				"Log Out", 
				JOptionPane.INFORMATION_MESSAGE);
		
		accounts.setActiveUser(null);
		outsideFrame.logoutGUI();
	}
}
